<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/components/MMS/Platform/Menu/List.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\..\..\index.html">All files</a> / <a href="index.html">src/components/MMS/Platform/Menu</a> List.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/51</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/10</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/30</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/51</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
  &lt;div o-Container&gt;
    &lt;o-list v-bind:source="list.menu"
            v-bind="{modified:modify,searched:search,paged:page}"
            v-on:subsendfather="receiveChildData"/&gt;
    &lt;div class="modal fade text-center" id="ModifyPanel" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel"
         aria-hidden="true"&gt;
      &lt;div class="modal-dialog"&gt;
        &lt;div class="modal-content"&gt;
          &lt;div class="modal-body text-left"&gt;
            &lt;o-item v-bind:source="item.language" v-bind="{validated:validate,saved:save,backed:back}"&gt;&lt;/o-item&gt;
            &lt;o-item v-bind:source="item.menu" v-bind="{loaded:load,changed:change}"&gt;&lt;/o-item&gt;
          &lt;/div&gt;
        &lt;/div&gt;&lt;!-- /.modal-content --&gt;
      &lt;/div&gt;&lt;!-- /.modal --&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
  export default {
    name: "mms_platform_menu_list", // 调试时可以更友好。
<span class="fstat-no" title="function not covered" >    data() {</span>
<span class="cstat-no" title="statement not covered" >      return {</span>
        octopus: this.$parent.octopus,
        list: {
          menu: {
            data: {
              id: 16,
              cellData: [
                {name: "LanguageID", width: "200"},
                {name: "ID", width: "50"},
                {name: "Status", searchKey: "=", width: 60},
                {name: "Sort", width: 60},
                {name: "Icon", width: 150},
                {name: "Url", searchKey: "Like", width: 300},
                {name: "Module", searchKey: "Like", width: 300},
                {name: "AuthorizationList", width: "200"},
                {name: "IsShow", width: 60},
                {name: "CreateUserID",},
                {name: "CreateDate", width: "170",}
              ],
            }
          },
        },
        item: {
          language: {
            // 以下参数默认由组件内部创建，但是如果有需要，开发人员可在这里提前设置，组件将按照您的预期渲染。
            // cache: false,
            // control: null,
            // dataExtend: null,
            data: {
              id: 17,
              cellData: [{name: "CN"},
                {name: "ZH"},
                {name: "EN"},
                {name: "JP"},
                {name: "KR"},
                {name: "CreateDate"}]
            },
            // 自定义button按钮，开发者选项。
            button: [{class: "btn-warning", click: this.translate, text: "Translate"}]
          },
          menu: {
            data: {
              id: 16,
              value: "#{param=id}",//采用八爪鱼转码器翻译
              // 刷新，默认false，当为true时触发一次load刷新。
              cellData: [{name: "ParentID"},
                {name: "Icon"},
                {name: "IconColor"},
                {name: "Sort"},
                {name: "Url"},
                {name: "Module", height: 50},
                {name: "AuthorizationList"},
                {name: "IsShow",},
                {name: "LanguageID", show: false},// load: false，只加载配置，不读数据库获取数据，show: false，加载配置和从数据库获取数据，但是不渲染至DOM。
                {name: "Status"},
                {name: "CreateUserID"},
                {name: "CreateDate"}]
            },
          },
        }
      }
    },
<span class="fstat-no" title="function not covered" >    created: function () {</span>
      // this.oData 等价于 this.octopus
<span class="cstat-no" title="statement not covered" >      this.oData.tips.debug("MenuList.vue执行了created事件。");</span>
    },
<span class="fstat-no" title="function not covered" >    mounted: function () {</span>
<span class="cstat-no" title="statement not covered" >      this.octopus.tips.debug("MenuList.vue执行了mounted事件。");</span>
    },
<span class="fstat-no" title="function not covered" >    updated: function () {</span>
<span class="cstat-no" title="statement not covered" >      this.octopus.tips.debug("MenuList.vue执行了updated事件。");</span>
    },
<span class="fstat-no" title="function not covered" >    activated: function () {</span>
<span class="cstat-no" title="statement not covered" >      this.octopus.tips.debug("MenuList.vue执行了activated事件。");</span>
    },
    methods: {
<span class="fstat-no" title="function not covered" >      create: function () {</span>
        // this.octopus.router.jump("/MMS/Platform/Menu/Modify?id=" + row.ID);
<span class="cstat-no" title="statement not covered" >        this.item.menu.data.value = null;</span>
<span class="cstat-no" title="statement not covered" >        this.item.menu.control.load();</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        $(function () {</span></span>
<span class="cstat-no" title="statement not covered" >          $("#ModifyPanel").modal('show');</span>
        });
      },
<span class="fstat-no" title="function not covered" >      output: function (data) {</span>
        // 导出以后，回调这里给客户端操作。
        // 核心思想是cellData包含search数据（不管有没有），回传以后发送export指令，后台api会直接返回导出的数据提供下载。
<span class="cstat-no" title="statement not covered" >        alert("export: get cell data is " + JSON.stringify(data));</span>
      },
<span class="fstat-no" title="function not covered" >      search: function (cell) {</span>
        // console.log("search:" + JSON.stringify(cell));
      },
<span class="fstat-no" title="function not covered" >      modify: function (row) {</span>
        // this.octopus.router.jump("/MMS/Platform/Menu/Modify?id=" + row.ID);
<span class="cstat-no" title="statement not covered" >        this.item.menu.data.value = row.ID;</span>
<span class="cstat-no" title="statement not covered" >        this.item.menu.control.load();</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        $(function () {</span></span>
<span class="cstat-no" title="statement not covered" >          $("#ModifyPanel").modal('show');</span>
        });
      },
<span class="fstat-no" title="function not covered" >      view: function (row) {</span>
<span class="cstat-no" title="statement not covered" >        alert("view key: " + JSON.stringify(row));</span>
      }
      ,
<span class="fstat-no" title="function not covered" >      del: function (row) {</span>
<span class="cstat-no" title="statement not covered" >        alert("del key: " + JSON.stringify(row));</span>
      },
<span class="fstat-no" title="function not covered" >      page: function (index) {</span>
<span class="cstat-no" title="statement not covered" >        console.log("page: " + index);</span>
      },
<span class="fstat-no" title="function not covered" >      receiveChildData: function (data) {</span>
<span class="cstat-no" title="statement not covered" >        this.octopus.tips.debug("接收到子组件传来的数据：" + data);</span>
      },
&nbsp;
&nbsp;
      ////////////////////////////////////////////// Menu菜单编辑控件 ////////////////////////////////////////////////
<span class="fstat-no" title="function not covered" >      load: function () {</span>
        // 如果Menu有主键值，说明是更新动作，否则创建动作，没有的加了也白加。
<span class="cstat-no" title="statement not covered" >        if (this.item.menu.data.value) {</span>
          // Menu菜单加载完成后，将值赋值给语言对象
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >          this.item.language.data.value = $.grep(this.item.menu.data.cellData, function (value) {</span></span>
<span class="cstat-no" title="statement not covered" >            return value.name == "LanguageID";//筛选出语言ID编号</span>
          })[0].defaultValue;
          // 这里调用控件对象的方法。
<span class="cstat-no" title="statement not covered" >          this.item.language.control.load();</span>
        }
      },
<span class="fstat-no" title="function not covered" >      validate: function (status) {</span>
        // 找到Menu组件对象 且 控件验证自身状态为true，如果自己为false，也没有必要验证下级其他控件了。
<span class="cstat-no" title="statement not covered" >        if (this.item.menu.control &amp;&amp; status) {</span>
<span class="cstat-no" title="statement not covered" >          status = this.item.menu.control.validate();</span>
          // this.octopus.tips.debug("从控件验证：" + status);
        }
<span class="cstat-no" title="statement not covered" >        return status;</span>
      },
<span class="fstat-no" title="function not covered" >      save: function (data) {</span>
<span class="cstat-no" title="statement not covered" >        if (data.status.code == 200) {</span>
          // 在Menu数据源中找到LanguageID变量并设置
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >          $.grep(this.item.menu.data.cellData, function (value) {</span></span>
<span class="cstat-no" title="statement not covered" >            return value.name == "LanguageID";//筛选出语言ID编号</span>
          })[0].defaultValue = this.item.language.data.value;
          // 执行菜单表的保存，组件内部会自动识别是创建还是更新。
<span class="cstat-no" title="statement not covered" >          this.item.menu.control.save();</span>
&nbsp;
&nbsp;
<span class="cstat-no" title="statement not covered" >          this.octopus.tips.success(data);</span>
          // 刷新list
<span class="cstat-no" title="statement not covered" >          this.list.menu.control.load();</span>
<span class="cstat-no" title="statement not covered" >          this.back();</span>
        }
      },
      // save_menu:function (data) {
      //   if (data.status.code == 200) {
      //     this.octopus.tips.success("Data Save Success.");
      //   }
      // },
<span class="fstat-no" title="function not covered" >      translate: function () {</span>
<span class="cstat-no" title="statement not covered" >        let o = this;</span>
<span class="cstat-no" title="statement not covered" >        let CN = flm("CN");</span>
<span class="cstat-no" title="statement not covered" >        let language = ["ZH", "EN", "JP", "KR"];</span>
        // 如果中文有值，才进入。
<span class="cstat-no" title="statement not covered" >        if (!this.octopus.tools.IsNullOrEmpty(CN.defaultValue)) {</span>
          // 翻译为繁体
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >          this.octopus.tools.translate(CN.defaultValue, "zh", "cht", function (cht_data) {</span></span>
<span class="cstat-no" title="statement not covered" >            flm("ZH").defaultValue = cht_data;</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >            o.octopus.tools.translate(CN.defaultValue, "zh", "en", function (en_data) {</span></span>
<span class="cstat-no" title="statement not covered" >              flm("EN").defaultValue = en_data;</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >              o.octopus.tools.translate(CN.defaultValue, "zh", "jp", function (jp_data) {</span></span>
<span class="cstat-no" title="statement not covered" >                flm("JP").defaultValue = jp_data;</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >                o.octopus.tools.translate(CN.defaultValue, "zh", "kor", function (kr_data) {</span></span>
<span class="cstat-no" title="statement not covered" >                  flm("KR").defaultValue = kr_data;</span>
                  // 延迟500毫秒给vue一个反应的时间。
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >                  setTimeout(function () {</span></span>
                    // 执行保存
<span class="cstat-no" title="statement not covered" >                    o.item.language.control.save();</span>
                  }, 500);
                });
              });
            });
          });
        } else {
<span class="cstat-no" title="statement not covered" >          this.octopus.tips.warning("ChineseBox is not null, Translate service failed.")</span>
        }
&nbsp;
        // find language module
<span class="fstat-no" title="function not covered" >        function flm(code) {</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >          return $.grep(o.item.language.data.cellData, function (value) {</span></span>
<span class="cstat-no" title="statement not covered" >            return value.name == code;//筛选出语言ID编号</span>
          })[0]
        }
      },
      // 菜单控件 联动 语言控件
      // Item控件数据值发生变化以后触发，和save不同，此处只要数据变化就会触发，save是只有保存才会触发。
<span class="fstat-no" title="function not covered" >      change: function (data) {</span>
<span class="cstat-no" title="statement not covered" >        this.octopus.tips.debug("Menu组件值：" + data.displayName + " 改变为：" + data.defaultValue);</span>
      },
<span class="fstat-no" title="function not covered" >      back: function () {</span>
<span class="cstat-no" title="statement not covered" >        $("#ModifyPanel").modal('hide');</span>
      }
    },
    props: ["oData"]
  }
&lt;/script&gt;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Jan 20 2020 17:54:15 GMT+0800 (GMT+08:00)
</div>
</div>
<script src="..\..\..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\..\..\sorter.js"></script>
</body>
</html>
